package com.itheima.HomeWork;

public class HM08 {
    public static void main(String[] args) {
        String str = "上海自来水来自海上";
        System.out.println(isSym(str));
    }

    public static boolean isSym(String str) {
        if (str == null) {
            return false;
        }
        StringBuilder sb = new StringBuilder(str);
        String reStr = sb.reverse().toString();
        return reStr.equals(str);
    }
}
